using System;
using System.Collections.Generic;
using MediatR;

namespace Agriculture.Api.Read.Application.Command
{
    /// <summary>
    /// 药品订单详情查询命令
    /// </summary>
    public class MedicineOrderDetailQuery : IRequest<MedicineOrderDetailResult>
    {
        /// <summary>
        /// 订单编号
        /// </summary>
        public string OrderNo { get; set; }
    }

    /// <summary>
    /// 药品订单详情结果
    /// </summary>
    public class MedicineOrderDetailResult
    {
        /// <summary>
        /// 订单编号
        /// </summary>
        public string OrderNo { get; set; }

        /// <summary>
        /// 订单金额
        /// </summary>
        public decimal OrderAmount { get; set; }

        /// <summary>
        /// 订单状态
        /// </summary>
        public string Status { get; set; }

        /// <summary>
        /// 提交时间
        /// </summary>
        public DateTime SubmitTime { get; set; }

        /// <summary>
        /// 收货人信息
        /// </summary>
        public ReceiverInfo Receiver { get; set; } = new ReceiverInfo();

        /// <summary>
        /// 订单药品列表
        /// </summary>
        public List<OrderMedicineInfo> Medicines { get; set; } = new List<OrderMedicineInfo>();

        /// <summary>
        /// 物流信息
        /// </summary>
        public LogisticsInfo Logistics { get; set; } = new LogisticsInfo();
    }

    /// <summary>
    /// 收货人信息
    /// </summary>
    public class ReceiverInfo
    {
        /// <summary>
        /// 收货人姓名
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 收货人电话
        /// </summary>
        public string Phone { get; set; }

        /// <summary>
        /// 收货地址
        /// </summary>
        public string Address { get; set; }
    }

    /// <summary>
    /// 订单药品信息
    /// </summary>
    public class OrderMedicineInfo
    {
        /// <summary>
        /// 药品名称
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 药品图片URL
        /// </summary>
        public string ImageUrl { get; set; }

        /// <summary>
        /// 药品规格
        /// </summary>
        public string Specification { get; set; }

        /// <summary>
        /// 用药说明
        /// </summary>
        public string Usage { get; set; }

        /// <summary>
        /// 数量
        /// </summary>
        public int Quantity { get; set; }
    }

    /// <summary>
    /// 物流信息
    /// </summary>
    public class LogisticsInfo
    {
        /// <summary>
        /// 物流公司
        /// </summary>
        public string Company { get; set; }

        /// <summary>
        /// 物流单号
        /// </summary>
        public string TrackingNumber { get; set; }

        /// <summary>
        /// 物流跟踪记录
        /// </summary>
        public List<LogisticsTrackingRecord> TrackingRecords { get; set; } = new List<LogisticsTrackingRecord>();
    }

    /// <summary>
    /// 物流跟踪记录
    /// </summary>
    public class LogisticsTrackingRecord
    {
        /// <summary>
        /// 时间
        /// </summary>
        public DateTime Time { get; set; }

        /// <summary>
        /// 描述
        /// </summary>
        public string Description { get; set; }
    }
} 